# 闰年判断
while True:
    try:
        inputStr = input("请输入一个年份：")
        if inputStr == "quit":
            break
        year = int(inputStr)
        if year % 400 == 0 or (year % 4 == 0 and year % 100 != 0):
            print(f"{year} 是闰年")
        else:
            print(f"{year} 不是闰年")
    except ValueError:
        print("请输入一个整数！")